from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from routers.user_router import user_router
from routers.product_router import product_router
from routers.order_router import order_router
from routers.device_router import device_router
from routers.file_router import file_router
from routers.request_router import request_router
from routers.response_model_router import response_model_router

app = FastAPI()
app.mount("/public", StaticFiles(directory="public"))

app.include_router(user_router, prefix="/user", tags=["user routers"])
app.include_router(product_router, prefix="/product", tags=["product routers"])
app.include_router(order_router, prefix="/order", tags=["order routers"])
app.include_router(device_router, prefix="/device", tags=["device routers"])
app.include_router(file_router, prefix="/file", tags=["file routers"])
app.include_router(request_router, prefix="/request", tags=["request routers"])
app.include_router(response_model_router, prefix="/response_model", tags=["response model routers"])


@app.get("/")
def index():
    return {"message": "Hello World"}


if __name__ == "__main__":
    import uvicorn

    uvicorn.run('main:app', reload=True)
